package cn.yogehaoren.foxgitstarter.properties;

import cn.yogehaoren.foxgitstarter.common.Constants;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author WangNing
 * date  2021/8/4 23:26
 * @version 1.0
 */
@ConfigurationProperties("fox-git.config")
public class GitProperties {


    /**
     * 强制同步
     */
    private Boolean forcePull = false;

    /**
     * 开启 Fox-Git
     */
    private Boolean enable = true;

    /**
     * Git 用户名
     */
    private String userName;

    /**
     * Git 密码
     */
    private String password;

    /**
     * 克隆本地地址
     */
    private String localPath;

    /**
     * Git 远程地址
     */
    private String remoteUrl;

    /**
     * Git webHookHeader
     */
    private String webHookHeader = Constants.GITEE_PASSWORD_HEADER;

    /**
     * Git WebHookToken
     */
    private String webHookToken ="!FoxGit!Password!";

    /**
     * 处理本地 Web Url
     */
    private String processWebHookUrl = "/fox-git/webHook";

    /**
     * 启动时同步
     */
    private Boolean enableStartPull = true;

    /**
     * 启动时同步时, 克隆时关闭系统
     */
    private Boolean closeSystemOnFirstClone = false;

    /**
     * 启动WebHook
     */
    private Boolean enableWebHook = true;

    /**
     * Web Hook 调用时自动同步
     */
    private Boolean autoPull = true;

    public Boolean getAutoPull() {
        return autoPull;
    }

    public void setAutoPull(Boolean autoPull) {
        this.autoPull = autoPull;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getLocalPath() {
        return localPath;
    }

    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    public String getRemoteUrl() {
        return remoteUrl;
    }

    public void setRemoteUrl(String remoteUrl) {
        this.remoteUrl = remoteUrl;
    }

    public String getWebHookHeader() {
        return webHookHeader;
    }

    public void setWebHookHeader(String webHookHeader) {
        this.webHookHeader = webHookHeader;
    }

    public String getWebHookToken() {
        return webHookToken;
    }

    public void setWebHookToken(String webHookToken) {
        this.webHookToken = webHookToken;
    }

    public String getProcessWebHookUrl() {
        return processWebHookUrl;
    }

    public void setProcessWebHookUrl(String processWebHookUrl) {
        this.processWebHookUrl = processWebHookUrl;
    }

    public Boolean getEnableStartPull() {
        return enableStartPull;
    }

    public void setEnableStartPull(Boolean enableStartPull) {
        this.enableStartPull = enableStartPull;
    }

    public Boolean getCloseSystemOnFirstClone() {
        return closeSystemOnFirstClone;
    }

    public void setCloseSystemOnFirstClone(Boolean closeSystemOnFirstClone) {
        this.closeSystemOnFirstClone = closeSystemOnFirstClone;
    }

    public Boolean getEnableWebHook() {
        return enableWebHook;
    }

    public void setEnableWebHook(Boolean enableWebHook) {
        this.enableWebHook = enableWebHook;
    }

    public Boolean getForcePull() {
        return forcePull;
    }

    public void setForcePull(Boolean forcePull) {
        this.forcePull = forcePull;
    }
}
